import { Children, useEffect, useState } from 'react'
import './App.css'

// use react hooks
const Demo=()=>{
    useEffect(()=>{
        console.log('useEffect')
})
    return(
        <div>
            Demo
        </div>
    )
}
function App() {
const [isShow,setIsShow]=useState(true);
useEffect(()=>{
    setTimeout(()=>{
        setIsShow(false)
    },1000)
})
  return (
      <div className='container'>
      {isShow && <Demo/>}
      </div>
  )
}

export default App
